package net.shopxx.dao.impl;

import net.shopxx.dao.DeliStaffDao;
import net.shopxx.entity.DeliStaff;

import org.springframework.stereotype.Repository;

/**
 * Dao实现类 - 物流人员
 */

@Repository
public class DeliStaffDaoImpl extends BaseDaoImpl<DeliStaff, String> implements DeliStaffDao {

	// 关联处理
	@Override
	public void delete(DeliStaff deliveryCorp) {
//		Set<DeliveryType> deliveryTypeSet = deliveryCorp.getDeliveryTypeSet();
//		if (deliveryTypeSet != null) {
//			for (DeliveryType deliveryType : deliveryTypeSet) {
//				deliveryType.setDefaultDeliveryCorp(null);
//			}
//		}
		super.delete(deliveryCorp);
	}

	// 关联处理
	@Override
	public void delete(String id) {
		DeliStaff deliStaff = load(id);
		this.delete(deliStaff);
	}

	// 关联处理
	@Override
	public void delete(String[] ids) {
		for (String id : ids) {
			DeliStaff deliStaff = load(id);
			this.delete(deliStaff);
		}
	}

}